Scibrokes® TonyStark®

Abstract

This is an academic research by apply R statistics analysis to an agency A of an existing betting consultancy firm A. According to the Dixon and Pope (2003), due to business confidential and privacy I am also using agency A and firm A in this paper. The purpose of the anaysis is measure the staking model of the firm A. For more sample which using R for Soccer Betting see http://rpubs.com/englianhu. Here is the references of rmarkdown and An Introduction to R Markdown. You are welcome to read the Wrangling F1 Data With R if you are getting interest to write a data analysis on Sportsbook.

1. Introduction to the Betting Stategics

There are quite some betting strategies in sportbook industry. Value betting is the popular staking stategy. Money management is the key for betting strategy.

The best and the most successful punters are money managers looking for ideal situations, which are defined as matches with only high percentage of return. In individual situations luck will play into the outcome of an event, which no amount of odds compiling can overcome, but in the long run a disciplined punter will win more of those lucky games than lose.

2. Dataset

2.1 Collect and Reprocess the Dataset

I collect the dataset of World Wide soccer matches from year 2011 until 2015 from a British betting consultancy named firm A. All bets placed by display on HK currency, and the odds price also measure based on Hong Kong price.

I tried to apply RSelenium on RStudio Server Centos7 to scrape the data from livescore website includes the odds price but the binary phantomjs is not available for Linux, and I also not familiar with the installation of Java as well as setting of the path for rJava. Kindly refer to Natural Language Analysis for more information about the teams name matching.

table 2.1.1 48744 x 37

Please refer to Natural Language Analysis to see the firm A staking sample dataset.

2.2 Overrounds / Vigorish

Fair odds: the odds that would be offered if the sum of the probabilities for all possible outcomes were exactly 1 (100%). For example, supposing we had a market with three possible outcomes {A, B, C} with probabilities of success \(P(A) = 0.5, P(B) = 0.4\) and \(P(C) = 0.1\), the fair odds would be 2.00, 2.50, and 10.00 respectively, which are just the inverse of the estimated probabilities.

Overround: Also called vigorish (or vig for short) in American sports betting, the overround is a measure of the bookmaker’s edge over the gambler. The bookmaker will never offer fair odds on a market. In practice, the payout offered on each selection will be reduced, which in turn increases the reflected probability of an event. When odds have been adjusted in this way the sum of the probabilities for all events will exceed 1 (100%). The overround is the amount by which the sum of all probabilities exceeds 100% and it is the bookmaker’s profit margin.

For example, if we had a market with two possible outcomes {A, B}, where \(P(A) = P(B) = 0.5\), the fair odds on each selection would be 2.00. However, the bookmaker may offer payouts of 1.85 on each selection. The corresponding probabilities for each selection are now 1/1.85 = 0.5405405, and the sum of the probabilities for all outcomes is 0.5405405 x 2 = 1.0810811. The overround is 8.1%, and for every $100 paid out by gamblers the bookmaker expects to make a profit of 8.1 dollars, assuming that there are balanced bets on both A and B.

I just simply get the lay price by applying below equation.

\[P_i^{HK_{Lay}} = 1/P_i^{HK_{Back}}-\nu_{j}\] equation 2.2.1

While \(\nu\) is the vigorish and \(j={1,2}\) which are AH=0.1 and OU=0.1. I have just simply calculated the Layed Fair odds (Odds Price with Vigorish which offer by operators), here I apply a setting profile which is term as lProfile (you can casually edit the soccer match profile setting) to get the Real Odds (Net Odds Price without Vigorish). As well as the Value \(Value = Real Price/Fair Odds\). Here we can use the Bet Stake Calculator Kelly Staking Calculator. I simply reverse value \(\Re\) to get the esimated \(P_{i}^{EM}\) (firm A) by refer to Section 5 Betting Strategy which we touch in Section 4.1.

Table 2.2.1 : Sample data about virogish/overrounds and also odds price.
No EUPrice HKPrice fHKPriceL fMYPriceB fMYPriceL netProbB netProbL
50 2.00 1.00 0.880 1.000 0.880 0.5319 0.4681
72 1.78 0.78 1.100 0.780 -0.909 0.4149 0.5851
122 2.11 1.11 0.781 -0.901 0.781 0.5870 0.4130
123 1.64 0.64 1.241 0.640 -0.806 0.3402 0.6598
164 1.97 0.97 0.910 0.970 0.910 0.5160 0.4840
219 1.92 0.92 0.980 0.920 0.980 0.4842 0.5158

table 2.2.1 48744 x 37

table 2.2.1 just provides some sample about the odds price and overrounds while you can refer to table 2.1.1 for details.

3. Analyse the Staking Model

3.1 Analyse the Annual Stakes

Before we start analyse the staking model, we are firstly see the monthly Stakes and Profit & Lose of the Agency A.

graph 3.1.1

From the graph above we know that the agency A generate profit every single month by following Sportsbook consultancy firm A.

Table 3.1.1 : Annual Summary of Staking Data.
Sess Stakes S.median S.mean S.sd Count Return PL PL.percent
2011 3529532400 360000 547978.9 650287.5 6441 3801269148 271736748 0.0769894
2012 4258734000 270000 419125.5 608394.3 10161 4716843700 458109700 0.1075695
2013 4914342900 270000 393336.2 397940.3 12494 5298180624 383837724 0.0781056
2014 4692365000 220000 369419.4 603856.1 12702 5222086638 529721638 0.1128901
2015 2483270000 230000 357510.8 433833.8 6946 2647644275 164374275 0.0661927

table 3.1.1 5 x 9

From the table above, we realized that the Asian agency A make profit by follow the British sportsbetting consultancy firm A every year. Since thousands of bets (and maximum bet limit setting, league profile setting, and also value betting which properly based on Kelly model, mean value will be kinda bias) placed per anum, here we take median will be accurate than mean value which is more than HKD200,000 per bet. The annual profit around 7~11%.

graph 3.1.2

From the graph above,

3.2 Analyse the Staking Handicap

In order to analyse only 90 minutes games, here I filter the matches from this section and so forth.

table 3.2.1 30 x 15, 60 x 15

From above table, mostly placed on Asian Handicap range concedes -0.50 ball to taken +1.00 ball. The -0.25 and +0.75 generates most profit.

Secondly, from the Goalline mostly taking over selection on 2.00 balls and 2.25 balls. (Since Dutch, Japanese, Spanish and Women soccer leagues always scoring more goals, but Protuguese, Italian, French leagues always score less, English leagues average 2.5 balls)

graph 3.2.1

Now we look at the graph above, we can know the Stakes breakdown on both AH and OU.

3.3 Analyse the Staking Prices

table 3.3.1 58 x 15, 32 x 15

From above table, the price range on 0.70~1.10 are mostly been placed. The Asian Handicap underdog on 0.70~1.10. We try to compare the stakes on 0.70~0.80 and 1.10~1.20, 0.60~0.70 and 1.20~1.30 and the returns/profit, we will know the price is importance on Value Betting.

graph 3.3.1

Above graph shows the Stakes and P&L on different price range.

3.4 Analyse the In-Play Stakes

table 3.4.1 53 x 15, 37 x 15

The table above shows the breakdown stakes on Breaks includes pregames of Extra-Time (started 90 minutes games), Half-Time and Full-Time in both 90 minutes games and also Extra-Time, Injuries-Time, Breaks-Time etc (All stakes after blew game-start whisle and before final result). While No means pre-games stakes and P&L summary.

graph 3.4.1

From the above graph shows the In-Play stakes, the first (0,10] time range placed most stakes while (55,60] start dropping. The includes all stakes when the soccer players are not playing on the football field. (Pre-games, Halft-Time, Full-Time, Extra-Time, Injuries Time, Breaks Time etc.)

table 3.4.2 2433 x 20, 1315 x 20

Above table shows a further details breakdown of In-Play stakes, includes the current scores and also current concedes/given handicap during In-Play while during Break means Break-Time or pre-Extra-Time etc. The complete data is dim(sample.data) 2433 x 20, 1315 x 20 for both AH and OU.

graph 3.4.2

4. Staking Model

4.1 Linear Model

Before we start modelling, we leeok at the summary of investment return rates basedon dataset mbase2.

Table 4.1.1 : Annual Return of Staking Data.
Sess Stakes Return n returnRates
2011 3529532400 3801269148 6441 1.076989
2012 4256654000 4713053700 10159 1.107220
2013 4914342900 5298180624 12494 1.078106
2014 4644315000 5177680413 12620 1.114843
2015 2478730000 2645079650 6926 1.067111

table 4.1.1 5 x 5

\[\Re = \sum_{i=1}^{n}\rho_{i}^{EM}/\sum_{i=1}^{n}\rho_{i}^{BK}\] equation 4.1.1

\(\Re\) is the return rates of investment. The \(\rho_i^{EM}\) is the estimated probabilities which is the calculated by firm A from match 1,2… until n matches while \(\rho_{i}^{BK}\) is the net/pure probability (real odds) offer by bookmakers after we fit the equation 4.1.2 into equation 4.1.1.

\[\rho_i = P_i^{Lay} / (P_i^{Back} + P_i^{Lay})\] equation 4.1.2

\(P_i^{Back}\) and \(P_i^{Lay}\) is the backed and layed fair price offer by bookmakers.

We can simply apply equation above to get the value \(\Re\). From the table above we know that the EMPrice calculated by firm A invested at a threshold edge (price greater) 1.0769894, 1.1072203, 1.0781056, 1.1148426, 1.0671108 than the prices offer by bookmakers. There are some description about \(\Re\) on Dixon&Coles1996.

table 4.1.2 48640 x 41

The above table list the odds prices and probabilities of i soccer matches while n indicates the number of soccer matches.

graph 4.1.1

Graph above shows the probabilities calculated by firm A to back against real probabilities offered by bookmakers over soccer matches.

Now we look at the result of the soccer matches.

Table 4.1.3 : Annual Return Summary of Staking Data.
Result Stakes Return Rates n S.prop R.prop prop
Cancelled 34170000 34170000 1 122 0.0017 0.0016 0.0025
Half Loss 1368345000 2052517500 1.5 3309 0.069 0.0949 0.068
Half Win 1490552500 2157943459 1.44774736817388 3590 0.0752 0.0997 0.0738
Loss 6882248400 0 0 17117 0.3472 0 0.3519
Push 2048665000 2048665000 1 4426 0.1033 0.0947 0.091
Win 7999593400 15341967576 1.91784342139189 20076 0.4035 0.7091 0.4127
Total 19823574300 21635263535 1.09139064467299 48640 0.9999 1 0.9999

table 4.1.3 7 x 8

The table above sumarise the stakes and return on soccer matches result.

[1] -3.50 -3.25 -3.00 -2.75 -2.50 -2.25 -2.00 -1.75 -1.50 -1.25 -1.00 [12] -0.75 -0.50 -0.25 0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75 [23] 2.00 2.25 2.50 2.75 3.00 3.25 3.50 3.75 4.00 4.25 4.50 [34] 4.75 5.00 5.25 5.50 5.75 6.00 6.25 6.50 6.75 7.00 7.25 [45] 7.50 7.75 8.00 8.25

Due to the soccer matches randomly getting from different leagues, and also not Bonouli win-lose result but half win-lose etc as we see from above. Besides, there were mixed Pre-Games and also In-Play soccer matches and I filter-up the sample data to be 20009 x 41. I don’t pretend to know the correct answer or the model from firm A. However I take a sample presentation An introduction to football modelling at Smartodds from one of consultancy firm which is Dixon-Coles model and omitted the scoring process section.

Here I cannot reverse computing from barely \(\rho_i^{EM}\) without know the \(\lambda_{ij}\) and \(\gamma\) values. Therefore I try to using both Home and Away Scores to simulate and test to get the maximum likelihood \(\rho_i^{EM}\).

\[X_{ij} = pois(\gamma \alpha_{ij} \beta_{ij} ); Y_{ij} = pois(\alpha_{ij} \beta_{ij})\] equation 4.1.3

The poisson model will be touoched in next section 4.2.

4.2 Poisson Modelling

Here we introduce the Dixon&Coles1996 poisson model and its codes. You are freely learning from below links if interest.

sample…

4.3 Kelly Model

From the papers Niko Marttinen2001 and Jeffrey Alan Logan Snyder 2013 both applying Full-Kelly,Half-Kelly and also Quarter-Kelly models which similar with my previous Kelly-Criterion model englianhu2014 but enhanced.

To achieve the level of profitable betting, one must develop a correct money management procedure. The aim for a punter is to maximize the winnings and minimize the losses. If the punter is capable of predicting accurate probabilities for each match, the Kelly criterion has proven to work effectively in betting. It was named after an American economist John Kelly (1956) and originally designed for information transmission. The Kelly criterion is described below:

\[S=(\rho*\sigma-1)/(\sigma-1)\] equation-4.3.1

Where S = the stake expressed as a fraction of one’s total bankroll, \(\rho\) = probability of an event to take place, \(\sigma\) = odds for an event offered by the bookmaker. Three important properties, mentioned by Hausch and Ziemba (1994), arise when using this criterion to determine a proper stake for each bet:

  • It maximizes the asymptotic growth rate of capital

  • Asymptotically, it minimizes the expected time to reach a specified goal

  • It outperforms in the long run any other essentially different strategy almost surely

The criterion is known to economists and financial theorists by names such as the geometric mean maximizing portfolio strategy, the growth-optimal strategy, the capital growth criterion, etc. We will now show that Kelly betting will maximize the expected log utility for sportsbook betting.

[1] 237152.8

\[K = \frac{(B + 1)p - 1} {B}\] equation 4.3.1

\[G: = \mathop {\lim }\limits_{N \to \infty } \frac{1/N}{\log}\left( {\frac{{{BR_N}}}{{{BR_0}}}} \right)\] equation 4.3.2

\[BR_N = (1 + K)^W(1 - K)^L BR_0\] equation 4.3.3

Kelly K-value 凯利模式资金管理

4.4 Staking Modelling and Money Management

sample…

4.5 Expectation Maximization and Staking Simulation

sample…

5. Result

5.1 Comparison of the Results

Chapter 4.2 Comparison of Different Feature Sets and Betting Strategies in

Dixon&Pope2003 apply linear model to compare the efficiency of the odds prices offer by first three largest Firm A, B and C in UK.

5.2 Market Basket

Here I apply the arules and arulesViz packages to analyse the market basket of the bets.

6. Conclusion

6.1 Conclusion

Due to the datasets I collected just one among all agents among couple sports-bookmakers 4lowin. Here I cannot determine if the sample data among the population…

6.2 Future Works

I will be apply Shiny to write a dynamic website to utilise the function as web based apps. You are welcome to refer SHOW ME SHINY.

I will also write as a package to easier load and log.

7. Appendices

7.1 Documenting File Creation

It’s useful to record some information about how your file was created.

  • File creation date: 2015-07-22
  • R version 3.2.3 (2015-12-10)
  • R version (short form): 3.2.3
  • rmarkdown package version: 0.8.1
  • File version: 1.0.3
  • File latest updated date: 2015-12-16
  • Author Profile: Ryo®, Eng Lian Hu
  • GitHub: Source Code
  • Additional session information

[1] “2015-12-16 15:18:42 JST” setting value
version R version 3.2.3 (2015-12-10) system x86_64, mingw32
ui RTerm
language (EN)
collate English_United States.1252
tz Asia/Tokyo
date 2015-12-16
sysname release version nodename machine “Windows” “10 x64” “build 10586” “SCIBROKES” “x86-64” login user effective_user “Scibrokes” “Scibrokes” “Scibrokes”

References

Powered by - Copyright© Intellectual Property Rights of Scibrokes®